<?php

Route::post('/login', 'LoginController@login')->name('login');
Route::get('/authInfo', 'LoginController@authInfo');
Route::post('/changePassword', 'LoginController@changePassword');

// 上传
Route::post('/upload/file', 'UploadController@upload')->name('upload');

// 首页
Route::get('/dashboard', 'IndexController@dashboard');
Route::get('/dashboard/set_low_data', 'IndexController@setLowData');
// 员工相关
Route::get('/staff', 'StaffController@index');
Route::post('/staff', 'StaffController@store');
Route::get('/staff/detail/{id}', 'StaffController@show');
Route::post('/staff/add', 'StaffController@add');
Route::post('/staff/{id}/update', 'StaffController@edit');
Route::delete('/staff/{id}', 'StaffController@destroy');

// house
Route::get('/house', 'HouseController@index');
Route::post('/house/{id}/update', 'HouseController@update');
Route::delete('/house/{id}', 'HouseController@destroy');

// contract
Route::get('/contract', 'ContractController@index');
Route::get('/contract/tenantList', 'ContractController@tenantList');
Route::get('/contract/{id}/getSignTaskDownloadUrl', 'ContractController@getSignTaskDownloadUrl');
Route::get('/contract/{id}/getTenant', 'ContractController@getTenant');

// device
Route::get('/device', 'DeviceController@index');
Route::get('/device/trouble', 'DeviceController@trouble');
Route::get('/device/clear_month', 'DeviceController@clearMonth')->name('clear_month');
Route::get('/device/{id}', 'DeviceController@detail')->name('device_detail');
Route::post('/device/{id}/update', 'DeviceController@update');
Route::post('/device/restart', 'DeviceController@restart');
Route::delete('/device/{id}', 'DeviceController@destroy');

// 拉闸
Route::post('/device/{id}/stop', 'DeviceController@stop');
// 合闸
Route::post('/device/{id}/start', 'DeviceController@start');
Route::post('/device/{id}/curr', 'DeviceController@curr');
Route::post('/device/{id}/total', 'DeviceController@setTotal');
// 清零
Route::post('/device/{id}/clear', 'DeviceController@clear');
// 调表
Route::post('/device/{id}/speed', 'DeviceController@speed');

Route::get('/device/rate', 'DeviceController@rateList');
Route::post('/device/rate/{id}/update', 'DeviceController@updateRate');
Route::post('/device/rate', 'DeviceController@addRate');

Route::get('/device/log', 'DeviceController@log');
Route::get('/device/heart_log', 'DeviceController@heartLog');
Route::get('/device/power_list', 'DeviceController@powerList');
Route::get('/device/{id}/offlog', 'DeviceController@offlog');
Route::get('/device/{id}/cancel', 'DeviceController@cancel');
Route::get('/device/warning_log', 'DeviceController@warningLog');
Route::get('/device/setMode', 'DeviceController@setMode');
// user
Route::get('/user', 'UserController@index');
Route::get('/user/cashLog', 'UserController@cashLog');
Route::get('/user/edit_disable', 'UserController@editDisabled');
Route::get('/user/edit_gongan', 'UserController@editGongan');
Route::get('/user/edit_white', 'UserController@editWhite');
Route::get('/user/change_cash', 'UserController@changeCash');
Route::get('/user/black', 'UserController@blackList');
Route::get('/user/del_black/{id}', 'UserController@delBlack');

Route::get('/disabled/list', 'DisabledController@getList');
Route::get('/disabled/edit', 'DisabledController@edit');



Route::post('/user/{id}/updateAgent', 'UserController@updateAgent');
Route::post('/user/{id}/updateDraw', 'UserController@updateDraw');
Route::post('/user/remarkBusiness', 'UserController@remarkBusiness');
Route::get('/bill', 'BillController@index');

// order
Route::get('/order', 'OrderController@index');
Route::get('/order/refund', 'OrderController@refund');
Route::post('/order/cancel', 'OrderController@cancelOrder');
Route::get('/order/hand', 'OrderController@handOrder');
Route::get('/order/draw', 'OrderController@drawOrder');
// qa
Route::get('/qa', 'QAController@index');
Route::get('/qa/{id}', 'QAController@detail');
Route::post('/qa/create', 'QAController@create');
Route::post('/qa/update/{id}', 'QAController@update');
Route::delete('/qa/{id}', 'QAController@destroy');

// article
Route::get('/article', 'ArticleController@index');
Route::get('/article/{id}', 'ArticleController@detail');
Route::post('/article/update/{id}', 'ArticleController@update');

Route::get('/feedback', 'FeedbackController@index');

Route::get('/device/powerLogData', 'DeviceController@powerLogData');


Route::get('/agent', 'AgentController@index');
Route::get('/agent/parent', 'AgentController@parentList');
Route::get('/agent/getParent', 'AgentController@getParent');
Route::get('/agent/all', 'AgentController@allList');
Route::get('/agent/cashLog', 'AgentController@cashLog');
Route::get('/agent/amountLog', 'AgentController@amountLog');
Route::post('/agent', 'AgentController@add');
Route::get('/agent/{id}', 'AgentController@show');
Route::get('/agent/order', 'AgentController@getOrder');
Route::put('/agent/{id}', 'AgentController@edit');


Route::get('/country', 'CountryController@index');
Route::post('/country', 'CountryController@add');
Route::get('/country/{id}', 'CountryController@show');
Route::put('/country/{id}', 'CountryController@edit');
Route::get('/country/del/{id}', 'CountryController@del');



Route::get('/tj_country', 'TjCountryController@index');
Route::post('/tj_country', 'TjCountryController@add');
Route::get('/tj_country/{id}', 'TjCountryController@show');
Route::put('/tj_country/{id}', 'TjCountryController@edit');
Route::get('/tj_country/del/{id}', 'TjCountryController@del');


Route::get('/country_log', 'CountryLogController@index');


Route::get('/restart', 'RestartDeviceController@index');
Route::post('/restart', 'RestartDeviceController@add');
Route::get('/restart/{id}', 'RestartDeviceController@show');
Route::put('/restart/{id}', 'RestartDeviceController@edit');
Route::get('/restart/del/{id}', 'RestartDeviceController@del');
Route::get('/restart/auto', 'RestartDeviceController@autoRestart')->name('auto_restart');;
Route::get('/restart/log', 'RestartDeviceController@restartLog');


Route::get('/record/list', 'TestRecordController@index');
Route::get('/record/del', 'TestRecordController@del');


Route::get('/business/getLvPrice', 'DeviceController@getLvPrice');
Route::post('/business/createLvPrice', 'DeviceController@createLvPrice');
Route::get('/business/setAdcode', 'DeviceController@setAdcode');
Route::get('/business/makeFg', 'DeviceController@makeFg');


Route::get('/complaint/list','ComplaintController@list');
Route::get('/complaint/detail','ComplaintController@detail');
Route::get('/complaint/history','ComplaintController@history');
Route::post('/complaint/uploadImage','ComplaintController@uploadImage');
Route::post('/complaint/reply','ComplaintController@handleComplaintReply');
Route::get('/complaint/replyComplete','ComplaintController@replayComplete');
Route::get('/complaint/downloadImage','ComplaintController@downloadImage');
Route::post('/complaint/getPhone','ComplaintController@getPhone');
